//
//  HorizontalScroll.swift
//  AliBaiChuan
//
//  Created by 郑东喜 on 2017/2/22.
//  Copyright © 2017年 郑东喜. All rights reserved.
//

import UIKit

class HorizontalScroll: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()


        
        
        //测试数据
        var vcArray:[UIViewController] = [UIViewController]()
//        for _ in 0..<12 {
//            
//            let vc = UIViewController()
//            vc.view.backgroundColor = UIColor.randomColor()
//            
//            vcArray.append(vc)
//        }
//        
//        
        
        let scV : CollectV = CollectV()
        
        let scV2 : CollectV = CollectV()
        
        vcArray.append(scV)
        vcArray.append(scV2)
        
        
        
        
        let pageView = CLScrollPageView(frame: CGRect(x: 0, y: 64, width: KScreenWidht, height: KScreenHeight))
        view.addSubview(pageView)
        //设置标题
//        pageView.titleArray =  ["笑话","呵呵大神大神的","看看","笑话","呵呵","看看","笑话","呵呵","看看打的的","笑话","呵呵","看看",]
        pageView.titleArray = ["测试","测试123"]
        //设置view
        pageView.pageArray = vcArray
        
        self.automaticallyAdjustsScrollViewInsets = false
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
}


